package org.middlewaregr.bp;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.middlewaregr.services.ThesesServiceCaller;

public class RejectProposalTask {

	public void reject(Integer proposal_id, String approval_description,
			String teacher_id) {
		try {
			DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
			ThesesServiceCaller.updateProposalStatus(proposal_id, "Rejected");
			ThesesServiceCaller.createCommentOnProposal(proposal_id, dateFormat
					.format(new Date()), approval_description, teacher_id);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
